﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace Corina.Controls.Silverlight
{
    public class PromptDialog : ContentControl
    {
        public string Title
        {
            get { return GetValue(TitleProperty) as string; }
            set
            {
                SetValue(TitleProperty, value);
            }
        }

        public static readonly DependencyProperty TitleProperty = DependencyProperty.Register(
            "Title",
            typeof(string),
            typeof(PromptDialog),
            new PropertyMetadata(string.Empty));

        #region OverlayBrush
        public SolidColorBrush OverlayBrush
        {
            get { return GetValue(OverlayBrushProperty) as SolidColorBrush; }
            set { SetValue(OverlayBrushProperty, value); }
        }

        public static readonly DependencyProperty OverlayBrushProperty = DependencyProperty.Register(
            "OverlayBrush",
            typeof(SolidColorBrush),
            typeof(PromptDialog),
            new PropertyMetadata(null));
        #endregion

        #region OverlayOpacity
        public double OverlayOpacity
        {
            get { return (double)GetValue(OverlayOpacityProperty); }
            set { SetValue(OverlayOpacityProperty, value); }
        }

        public static readonly DependencyProperty OverlayOpacityProperty = DependencyProperty.Register(
            "OverlayOpacity",
            typeof(double),
            typeof(PromptDialog),
            new PropertyMetadata(0.5));
        #endregion

        #region WindowHeight
        public double WindowHeight
        {
            get { return (double)GetValue(WindowHeightProperty); }
            set { SetValue(WindowHeightProperty, value); }
        }

        public static readonly DependencyProperty WindowHeightProperty = DependencyProperty.Register(
            "WindowHeight",
            typeof(double),
            typeof(PromptDialog),
            new PropertyMetadata(400.00));
        #endregion

        #region WindowWidth
        public double WindowWidth
        {
            get { return (double)GetValue(WindowWidthProperty); }
            set { SetValue(WindowWidthProperty, value); }
        }

        public static readonly DependencyProperty WindowWidthProperty = DependencyProperty.Register(
            "WindowWidth",
            typeof(double),
            typeof(PromptDialog),
            new PropertyMetadata(600.00));
        #endregion

        #region CloseCommand
        public static DependencyProperty CloseCommandProperty = DependencyProperty.Register(
            "CloseCommand",
            typeof(ICommand),
            typeof(PromptDialog), new PropertyMetadata(null));

        public ICommand CloseCommand
        {
            get
            {
                return (ICommand)GetValue(CloseCommandProperty);
            }

            set
            {
                SetValue(CloseCommandProperty, value);
            }
        }

        #endregion

        #region HorizontalWindowAlignment
        public HorizontalAlignment HorizontalWindowAlignment
        {
            get { return (HorizontalAlignment)GetValue(HorizontalWindowAlignmentProperty); }
            set
            {
                SetValue(HorizontalWindowAlignmentProperty, value);
            }
        }

        public static readonly DependencyProperty HorizontalWindowAlignmentProperty = DependencyProperty.Register(
            "HorizontalWindowAlignment",
            typeof(HorizontalAlignment),
            typeof(PromptDialog),
            new PropertyMetadata(HorizontalAlignment.Stretch));
        #endregion

        #region VerticalWindowAlignment
        public VerticalAlignment VerticalWindowAlignment
        {
            get { return (VerticalAlignment)GetValue(VerticalWindowAlignmentProperty); }
            set
            {
                SetValue(VerticalWindowAlignmentProperty, value);
            }
        }

        public static readonly DependencyProperty VerticalWindowAlignmentProperty = DependencyProperty.Register(
            "VerticalWindowAlignment",
            typeof(VerticalAlignment),
            typeof(PromptDialog),
            new PropertyMetadata(VerticalAlignment.Stretch));
        #endregion

        #region ContentMargin
        public Thickness ContentMargin
        {
            get { return (Thickness)GetValue(ContentMarginProperty); }
            set
            {
                SetValue(ContentMarginProperty, value);
            }
        }

        public static readonly DependencyProperty ContentMarginProperty = DependencyProperty.Register(
            "ContentMargin",
            typeof(Thickness),
            typeof(PromptDialog),
            new PropertyMetadata(new Thickness(0)));
        #endregion
    }
        
}
